import request from '@/utils/request'

// 查询商家特殊补贴列表
export function listSubsidy(query) {
  return request({
    url: '/union/subsidy/list',
    method: 'get',
    params: query
  })
}

// 查询商家特殊补贴详细
export function getSubsidy(id) {
  return request({
    url: '/union/subsidy/' + id,
    method: 'get'
  })
}

// 新增商家特殊补贴
export function addSubsidy(data) {
  return request({
    url: '/union/subsidy',
    method: 'post',
    data: data
  })
}

// 修改商家特殊补贴
export function updateSubsidy(data) {
  return request({
    url: '/union/subsidy',
    method: 'put',
    data: data
  })
}

// 删除商家特殊补贴
export function delSubsidy(id) {
  return request({
    url: '/union/subsidy/' + id,
    method: 'delete'
  })
}

export function listSubsidyPeriod(shopId) {
  return request({
    url: '/union/subsidy/period/' + shopId,
    method: 'get'
  })
}
